package com.margo.project.zipkin.configure;

import javax.sql.DataSource;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import zipkin2.storage.mysql.v1.MySQLStorage;

@Configuration
public class MargoZipkinServerConfigure {

	@Bean
	public MySQLStorage mySQLStorage(DataSource datasource) {
		return MySQLStorage.newBuilder().datasource(datasource).executor(Runnable::run).build();
	}
}
